package com.atguigu.service.impl;

import com.atguigu.Dto.UserDto;
import com.atguigu.mapper.UserMapper;
import com.atguigu.pojo.User;
import com.atguigu.result.Result;
import com.atguigu.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public Result getUser(UserDto userDto) {
        User user = userMapper.getUser(userDto);
        if(user != null){
            return Result.success(user);
        }
        return Result.error("账号或密码错误!");
    }
}
